<template>
	<view class="indexs">
		<top-nav 
			:back="myback" 
			:topMainBackGroundColor="topMainBackGroundColor" 
			:navMarginTop="navMarginTop"
			:topBackgroundColor="topBackgroundColor"
			:topHeight="topHeight">
			<view class="input-container">
				<uni-easyinput v-model="inputValue" placeholder="请输入" @click="inputOnclik" :suffixIcon="suffixIcon"/>
			</view>
		</top-nav>
		<view class="content">
			<top-nav-menu></top-nav-menu>
			<hot-recommon></hot-recommon>
		</view>
	</view>
</template>

<script>
	import topNav from '@/components/topnav/topNav.vue'
	import topNavMenu  from "@/pages/index/cpns/topNavMenu.vue"
	import hotRecommon from "@/pages/index/cpns/hotRecommon.vue"
	import easyInput from '@/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue'
	export default {
		components: {
			topNavMenu,
			hotRecommon,
			topNav,
			easyInput
		},
		data() {
			return {
				myback: {
					show: false
				},
				inputValue: '',
				suffixIcon: 'search',
				topMainBackGroundColor: '#eeb35f',
				topBackgroundColor: '#eeb35f',
				navMarginTop: 0,
				topHeight: 50,
			}
		},
		onLoad() {
			console.log('ddddd')
		},
		onPageScroll(e) {
			if(e.scrollTop > 50) {
				this.topMainBackGroundColor = '#fff'
				this.topBackgroundColor = '#fff'
			} else {
				this.topMainBackGroundColor = '#eeb35f'
				this.topBackgroundColor = '#eeb35f'
			}
		},
		methods: {
			inputOnclik() {
				console.log('点击了')
			},
			changeTopNavColor() {
				
			}
		}
	}
</script>

<style lang="scss" scoped>
	.input-container {
		margin-left: 20px;
		width: 66.6vw;
		background: linear-gradient();
	}
</style>
